from typing import List


def findNumberOfLIS(nums: List[int]) -> int:
    n = len(nums)
    dp_com = [1] * n
    dp_length = [1] * n
    result = 1
    for i in range(1, n):
        # 找到长度最长的所有子序列
        max_length = 1
        index_set_length = 1
        for j in range(i):
            if nums[i] > nums[j]:
                if max_length < dp_length[j]:
                    max_length = dp_length[j]
                    index_set_length = 1
                elif max_length == dp_length[j]:
                    index_set_length += 1
        dp_com[i] = index_set_length
    return result


if __name__ == '__main__':
    n = findNumberOfLIS([3, 2, 1])
    print(n)
